Make p8s an alias for pcs (escaped hex string) Fix #10058#24729
Make p8s an alias for pcs (escaped hex string) Fix #10058#24729vicky-dx wants to merge 1 commit intoradareorg:masterfrom
Conversation
The p8s command was printing space-separated hex bytes, which was not intuitive. Many users expect it to print escaped hex strings like pcs does (e.g., "\x68\x65\x6c\x6c\x6f"). Changes: - Changed p8s to call pcs internally - Updated help message to clarify p8s is now an alias for pcs - Provides more intuitive behavior for creating escaped strings Before: p8s 11 → 68 65 6c 6c 6f 20 77 6f 72 6c 64 After: p8s 11 → "\x68\x65\x6c\x6c\x6f\x20\x77\x6f\x72\x6c\x64" This makes p8s behave as users naturally expect when looking for escaped hex string output. Fixes radareorg#10058
|
im pretty sure i wrote a response for this ticket but seems like i forgot to submit it.. anyway what i wanted to say is that the problem here is that we treat different command suffix in a wrong way. strings are usually determined by:
it feels like p8s should be doing a string.. and this 'spaced' bytepairs seems confusing, so let me think a bit on all those subcommands a little and ill suggest more changes on the p8 subcommands as well as in px |
|
Coming from #24791, I was wondering what was the meaning of a TODO mentioning supporting In my understanding, the prefix ( So, following this logic, However, the As changing I don't know if reaching consistency across all printing commands with suffixes controlling the output format is possible TBH. As long as things are fairly logical/natural I think it's ok, and there will edge cases that will mess up our dream of perfect order. This was my 2¢ |
The p8s command was printing space-separated hex bytes, which was not intuitive. Many users expect it to print escaped hex strings like pcs does (e.g., "\x68\x65\x6c\x6c\x6f").
Changes:
Before:
p8s 11 → 68 65 6c 6c 6f 20 77 6f 72 6c 64
After:
p8s 11 → "\x68\x65\x6c\x6c\x6f\x20\x77\x6f\x72\x6c\x64"
This makes p8s behave as users naturally expect when looking for escaped hex string output.
Fixes #10058